import {createRouter, createWebHashHistory, createWebHistory} from 'vue-router'

const router = createRouter({
    // history: createWebHistory(import.meta.env.BASE_URL),
    history: createWebHashHistory(),
    routes: [
        {
            path: '/',
            name: 'home',
            component: () => import('../components/Layout.vue'),
            children: [
                {
                    path: 'dashboard',
                    name: 'dashboard',
                    component: () => import('../view/rabbitmq/dashboard/Dashboard.vue'),
                },
                {
                    path: 'node',
                    name: 'node',
                    component: () => import('../view/rabbitmq/node/Node.vue'),
                },
                {
                    path: 'node-details',
                    name: 'node-details',
                    component: () => import('../view/rabbitmq/node/NodeDetails.vue'),
                },
                {
                    path: 'exchange',
                    name: 'exchange',
                    component: () => import('../view/rabbitmq/exchange/Exchange.vue'),
                },
                {
                    path: 'exchange-details',
                    name: 'exchange-details',
                    component: () => import('../view/rabbitmq/exchange/ExchangeDetails.vue'),
                },
                {
                    path: 'queue',
                    name: 'queue',
                    component: () => import('../view/rabbitmq/queue/Queue.vue'),
                },
                {
                    path: 'queue-details',
                    name: 'queue-details',
                    component: () => import('../view/rabbitmq/queue/QueueDetails.vue'),
                },
                {
                    path: 'user',
                    name: 'user',
                    component: () => import('../view/rabbitmq/user/User.vue'),
                },
                {
                    path: 'connection',
                    name: 'connection',
                    component: () => import('../view/rabbitmq/connection/Connection.vue'),
                },
                {
                    path: 'channel',
                    name: 'channel',
                    component: () => import('../view/rabbitmq/channel/Channel.vue'),
                },
                {
                    path: 'vhost',
                    name: 'vhost',
                    component: () => import('../view/rabbitmq/vhost/Vhost.vue'),
                },
                {
                    path: 'policy',
                    name: 'policy',
                    component: () => import('../view/rabbitmq/policy/Policy.vue'),
                },
                {
                    path: 'policy-details',
                    name: 'policy-details',
                    component: () => import('../view/rabbitmq/policy/PolicyDetails.vue'),
                },
                {
                    path: 'shovel',
                    name: 'shovel',
                    component: () => import('../view/rabbitmq/shovel/Shovel.vue'),
                },
                {
                    path: 'shovel-details',
                    name: 'shovel-details',
                    component: () => import('../view/rabbitmq/shovel/ShovelDetails.vue'),
                },
                {
                    path: 'webhook',
                    name: 'webhook',
                    component: () => import('../view/rabbitmq/webhook/Webhook.vue'),
                },
                {
                    path: 'parameter',
                    name: 'parameter',
                    component: () => import('../view/rabbitmq/parameter/Parameter.vue'),
                }
            ]
        },
        {
            path: '/login',
            name: 'login',
            component: () => import('../view/login/Login.vue')
        }
    ]
})


export default router
